/* kakao-pixel-web@1.6.2-release 2024-08-29 14:22:22 */ !function(){try{if(!("kakaoPixel"in self)){var e=(function(e){"use strict";var t,n,r,o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a=function(e,t){var n={identity:t},r=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?r.apply(this,arguments):n},writable:!0}),n},u=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw Error("Weakmap-shim: Key must be object");var n=t.valueOf(e);return n&&n.identity===e?n:a(t,e)}},c=i(function(){var e=u();return{get:function(t,n){var r=e(t);return r.hasOwnProperty("value")?r.value:n},set:function(t,n){return e(t).value=n,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}),s="function"==typeof window.WeakMap?window.WeakMap:c;function l(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function f(e,t){var n=l(e,t,"get");return n.get?n.get.call(e):n.value}function v(e,t,n){!function(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}function d(e,t,n){var r=l(e,t,"set");return!function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=n}}(e,r,n),n}function p(e,t){for(var n=0;n0}},{key:"setAdId",value:function(e){return this.storage.setItem(k.adId,e),this}},{key:"getAdId",value:function(){return this.storage.getItem(k.adId)}},{key:"setLimitAdTrackingEnabled",value:function(e){return this.storage.setItem(k.limitAdTrackingEnabled,e?"Y":"N"),this}},{key:"isLimitAdTrackingEnabled",value:function(){var e=this.storage.getItem(k.limitAdTrackingEnabled);return"Y"===e}}],g(n.prototype,e),t&&g(n,t),n}();function O(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:function(){return n.defaultStorage};!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),P(this,"innerStorage",void 0);try{var r=e(),o=r.getItem(I);r.removeItem(I),r.setItem(I,null!=o?o:"");var i=r.length;r.key(i-1),null===o&&r.removeItem(I),this.innerStorage=r}catch(e){this.innerStorage=t()}}return e=[{key:"length",get:function(){return this.innerStorage.length}},{key:"clear",value:function(){this.innerStorage.clear()}},{key:"getItem",value:function(e){return this.innerStorage.getItem(e)}},{key:"setItem",value:function(e,t){this.innerStorage.setItem(e,t)}},{key:"removeItem",value:function(e){this.innerStorage.removeItem(e)}},{key:"key",value:function(e){return this.innerStorage.key(e)}}],C(n.prototype,e),t&&C(n,t),n}();P(A,"defaultStorage",new S);var T={exports:{}};T.exports=function(){function e(e){return"function"==typeof e}var t,n,r,i,a=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},u=0,c=void 0,s=void 0,l=function(e,t){b[u]=e,b[u+1]=t,u+=2,2===u&&(s?s(m):g())},f="undefined"!=typeof window?window:void 0,v=f||{},d=v.MutationObserver||v.WebKitMutationObserver,p="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"===({}).toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function y(){var e=setTimeout;return function(){return e(m,1)}}var b=Array(1e3);function m(){for(var e=0;ee.length)&&(t=e.length);for(var n=0,r=Array(t);nr.indexOf(t)&&r.push(t)}else this.listeners[e]=t;return function(){return n.removeListener(e,t)}}},{key:"removeListener",value:function(e,t){if(e in this.listeners){var n=this.listeners[e];if("function"==typeof n)n===t&&delete this.listeners[e];else{var r=n.indexOf(t);r>=0&&n.splice(r,1)}}}},{key:"removeAllListeners",value:function(e){var t=this;e?delete this.listeners[e]:Object.keys(this.listeners).forEach(function(e){delete t.listeners[e]})}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1))&&M("Invalid currency: ".concat(r.currency))}if(r.products)for(o=0;oe.length)&&(t=e.length);for(var n=0,r=Array(t);n2)||void 0===arguments[2]||arguments[2];if(!t)return e;var r=document.createElement("a");r.href=e;var o=0===r.pathname.indexOf("/")?r.pathname:"/".concat(r.pathname),i="".concat(r.protocol,"//").concat(r.host).concat(o);if(n){var a=Z(function(e){for(var t=1;t0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&(e.breadcrumbs={values:[].slice.call(O,0)}),S=e.event_id="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),C=e,l("debug","Jackdaw about to send:");var o,i,a,u,c,s,v,p,b,g=P=e.exception&&e.exception.values[0];k.addBreadcrumb({category:"sentry",message:g?(g.type?g.type+": ":"")+g.value:e.message,event_id:S,level:e.level||"error"});try{n({url:T,data:e,onSuccess:function(){I=0,A=null,t&&t()},onError:function(e){l("error","Jackdaw transport failed to send: ",e),e.request&&function(e){if(f())return void l("warn","Should back off");var t,n=e.status;if(400===n||401===n||429===n){try{t=e.getResponseHeader("Retry-After"),t=1e3*parseInt(t,10)}catch(e){}I=t||2*I||1e3,A=m()}}(e.request),t&&t(e)}})}catch(e){t&&t(e)}}function d(e,t){if(!!e^!!t)return!1;var n=e.frames,r=t.frames;if(void 0===n||void 0===r||n.length!==r.length)return!1;for(var o,i,a=0;ax.maxBreadcrumbs&&O.splice(0,O.length-x.maxBreadcrumbs),this},this.captureMessage=function(e,t,n){var o=E;if(!e)throw new r("Need something to send message");return t&&"function"==typeof t.transport&&(o=t.transport,delete t.transport),v(y({message:e+""},t||{}),n,o),this},this.captureException=function(e,t,n){var i,a,u,s,l,f,d,p,h,m=E;if(!e)throw new r("Need something to send exception or error");if(t&&"function"==typeof t.transport&&(m=t.transport,delete t.transport),e.error&&(e=e.error),o(e)||(i=e,"[object DOMException]"===Object.prototype.toString.call(i))){var g=e.name||(o(e)?"DOMError":"DOMException"),k=e.message?g+": "+e.message:g;return this.captureMessage(k,y(t,{stacktrace:!0,trimHeadFrames:t.trimHeadFrames+1}))}P=e,(t=y({trimHeadFrames:0},t||{})).level=t.level||"error";var w=function e(t,n){function r(){try{return c.location.href}catch(e){}return""}var o=null;n=null==n?0:+n;try{if(o=function(e){if(void 0!==e.stack&&e.stack){for(var t,n,o,i=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack||[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,u=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/,l=e.stack.split("\n"),f=[],v=0,d=l.length;v eval")>-1&&(t=c.exec(n[3]))?(n[3]=t[1],n[4]=t[2],n[5]=null):0!==v||n[5]||void 0===e.columnNumber||(f[0].column=e.columnNumber+1),o={url:n[3],func:n[1]||"?",args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!o.func&&o.line&&(o.func="?"),f.push(o)}return f.length?{name:e.name,message:e.message,url:r(),stack:f}:null}}(t))return o}catch(e){}try{if(o=function t(n,o){for(var i,a,u=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,c=[],s={},l=!1,f=t.caller;f&&!l;f=f.caller)if(f!==e){if(a={url:null,func:"?",line:null,column:null},f.name?a.func=f.name:(i=u.exec(f.toString()))&&(a.func=i[1]),void 0===a.func)try{a.func=i.input.substring(0,i.input.indexOf("{"))}catch(e){}s[""+f]?l=!0:s[""+f]=!0,c.push(a)}o&&c.splice(0,o);var v={name:n.name,message:n.message,url:r(),stack:c};return function(e,t,n,r){var o={url:t,line:n};if(o.url&&o.line){if(e.incomplete=!1,o.func||(o.func="?"),e.stack.length>0&&e.stack[0].url===o.url){if(e.stack[0].line===o.line)return 0;if(!e.stack[0].line&&e.stack[0].func===o.func)return e.stack[0].line=o.line,0}return e.stack.unshift(o),e.partial=!0}e.incomplete=!0}(v,n.sourceURL||n.fileName,n.line||n.lineNumber,n.message||n.description),v}(t,n+1))return o}catch(e){}return{name:t.name,message:t.message,url:r()}}(e),O=function(e,t){var n=[];if(e.stack&&e.stack.length&&(b(e.stack,function(t,r){var o,i,a=(o=e.url,i={filename:r.url,lineno:r.line,colno:r.column,function:r.func||"?"},r.url||(i.filename=o),i);a&&n.push(a)}),t&&t.trimHeadFrames))for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};return(n=function(){var n,i;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]-1?"https://bc.ds.kakao.com/bc":"https://bc.ad.daum.net/bc",s=z(c,{d:JSON.stringify(u)}),l=n.createHeaders(),[4,(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.timeout,r=void 0===n?2e3:n,o=t.headers;return new x.Promise(function(t,n){var i=0;r>0&&(i=window.setTimeout(function(){i=0,n(Error("Fetch request timed out"))},r)),Q(e,{credentials:"include",headers:o}).then(t).catch(n).finally(function(){i>0&&(window.clearTimeout(i),i=0)})})})(s,{headers:l}).catch(function(e){var t;throw new eE((t=Error,null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t)?e.message:"Fetch request has failed",{error:e,conversionData:u,url:s,headers:l})})];case 5:if((f=y.sent()).ok)return[3,7];return v=ex.bind,d=[void 0,"Fetch response was not ok"],p={statusCode:f.status,statusText:f.statusText},[4,f.text().catch(function(){})];case 6:throw new(v.apply(ex,d.concat([(p.responseBody=y.sent(),p.conversionData=u,p.url=s,p.headers=l,p)])));case 7:return n.storeAid(f),[3,9];case 8:return h=y.sent(),ex.capture(h,{trackId:n.trackId,eventCode:e,eventParameters:t}),[3,9];case 9:return[2]}})})()}},{key:"createConversionData",value:function(e,t){var n=this;return eF(function(){var r,o,i,a,u,c,s,l,f,v,d,p,h,y,b,m,g,k,w,O,S,C,P,I,A,T,x,E,j,_,D,L,R,M,N,K,F;return eV(this,function(B){switch(B.label){case 0:if(l=!(s=n.globalDataStorage.isLimitAdTrackingEnabled())&&(null===(r=n.globalDataStorage.getAdId())||void 0===r?void 0:r.trim())||void 0,f=(null===(o=n.globalDataStorage.getKakaoAccountId())||void 0===o?void 0:o.trim())||void 0,!(v=function(){try{if(!window.Kakao||!window.Kakao.Auth||!window.Kakao.Auth.getAppKey||!window.Kakao.Auth.getAccessToken||window.Kakao.isInitialized&&!window.Kakao.isInitialized())return null;var e=window.Kakao.Auth.getAppKey(),t=window.Kakao.Auth.getAccessToken();if(e)return{appKey:e,accessToken:t}}catch(e){}return null}()))return[3,2];return[4,function(e){return en.apply(this,arguments)}(v)];case 1:return p=B.sent(),[3,3];case 2:p=n.globalDataStorage.getEncryptedKakaoAccountId(),B.label=3;case 3:return d=p||void 0,[4,n.adFitConversionDataService.getAdFitConversionData()];case 4:return y=(h=B.sent()).etxId,b=h.surl,m=h.kclid,g=(null===(i=n.globalDataStorage.getIDFV())||void 0===i?void 0:i.trim())||void 0,k=null===(a=v)||void 0===a?void 0:a.appKey,w=null===(u=v)||void 0===u?void 0:u.accessToken,O=s?"Y":"N",S=(null===(c=n.globalDataStorage.getServiceOrigin())||void 0===c?void 0:c.trim())||void 0,C=document.domain,P="WEB",I=ef,A=window.location.href,T=b||document.referrer||void 0,x=window.location!==window.parent.location,E=window.navigator.doNotTrack?"Y":"N",[4,es()];case 5:return _=(j=B.sent()).deviceType,D=j.browser,L=j.browserVersion,R=j.os,M=j.osVersion,N=j.model,K=j.isMobile?"Y":"N",[4,n.getTpc()];case 6:return F=B.sent(),[2,{track_id:n.trackId,event_code:e,params:t,ad_id:l,accid:f,eacid:d,etx_id:y,kclid:m,props:{idfv:g,app_key:k,app_access_token:w,lmt:O,service_origin:S},site:{identifier:C},sdk:{type:P,version:I,tpc:F},page:{url:A,ref_url:T,is_frame_env:x},device:{dnt:E,device_type:_,is_mobile:K,browser:D,browser_version:L,os:R,os_version:M,model:N}}]}})})()}},{key:"createHeaders",value:function(){var e,t={},r=null===(e=this.aidStorage)||void 0===e?void 0:e.get();if(r){var o=r.aid,i=r.aidTs;t["x-kakao-aid"]=n.createAidHeader(o,i)}return t}},{key:"storeAid",value:function(e){var t=e.headers.get("x-kakao-aid");if(t){var r=n.parseAidHeader(t);if(r){var o=r.aid,i=r.aidTs;this.aidStorage.set(o,i)}}}},{key:"getTpc",value:function(){var e=this;return eF(function(){return eV(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,e.thirdPartyCookieSupportStatusChecker.getThirdPartyCookieSupportStatus(500)];case 1:return[2,t.sent()];case 2:return t.sent(),[2,void 0];case 3:return[2]}})})()}}],t=[{key:"parseAidHeader",value:function(e){var t={};return(e.split(",").forEach(function(e){var n,r=(n=e.split("="),function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,u=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){u=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(u)throw r}}return i}}(n,2)||function(e,t){if(e){if("string"==typeof e)return eN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eN(e,t)}}(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[0],i=r[1];t[o.trim()]=i.trim()}),"aid"in t&&"aid_ts"in t)?{aid:t.aid,aidTs:t.aid_ts}:null}},{key:"createAidHeader",value:function(e,t){return"aid=".concat(e,",aid_ts=").concat(t)}}],e&&eB(n.prototype,e),t&&eB(n,t),n}();function eX(e,t){for(var n=0;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)return{etxId:e.etxId,surl:e.surl}}},{key:"getAdFitConversionDataFromOpener",value:function(){var e;if(null===(e=window.opener)||void 0===e?void 0:e.postMessage)return new x.Promise(function(e){function t(n){try{var r=JSON.parse(n.data),o=r.type,i=r.detail;if("adfit:conversionData"!==o)return;if(window.removeEventListener("message",t),!i||"object"!=typeof i){e(void 0);return}e(i)}catch(e){}}window.addEventListener("message",t),window.opener.postMessage(tw,"*"),setTimeout(function(){window.removeEventListener("message",t),e(void 0)},1e3)})}},{key:"getAdFitConversionData",value:function(){var e;return(e=function(){var e,n,r;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n0))throw new ex(tu);if(n in r)return r[n];e||(e=new ez),t||(t=new e8);var i=new eH(String(n),o,c,v),a=new W(i),u=new eW(e,a),s=new e1(t,a),f=new m({standardEventTracker:a,naverCheckoutEventTracker:u,paycoCheckoutEventTracker:s});return r[n]=f,l.addTrack(n),a.addListener("eventCall",function(e,t){l.addEventCall({eventCode:e,trackId:n,parameters:t})}),f}catch(e){throw ex.capture(e,{trackId:n}),e}}).setKakaoAccountId=function(e){return o.setKakaoAccountId(e),d},d.getKakaoAccountId=function(){return o.getKakaoAccountId()},d.setEncryptedKakaoAccountId=function(e){return o.setEncryptedKakaoAccountId(e),d},d.getEncryptedKakaoAccountId=function(){return o.getEncryptedKakaoAccountId()},d.setIDFV=function(e){return o.setIDFV(e),d},d.getIDFV=function(){return o.getIDFV()},d.setServiceOrigin=function(e){return o.setServiceOrigin(e),d},d.getServiceOrigin=function(){return o.getServiceOrigin()},d.hasServiceOrigin=function(){return o.hasServiceOrigin()},d.setAdId=function(e){return o.setAdId(e),d},d.getAdId=function(){return o.getAdId()},d.setLimitAdTrackingEnabled=function(e){return o.setLimitAdTrackingEnabled(e),d},d.isLimitAdTrackingEnabled=function(){return o.isLimitAdTrackingEnabled()},d.getBidId=function(){return u.get()},d.getAid=function(){var e;return null!==(n=null===(e=c.get())||void 0===e?void 0:e.aid)&&void 0!==n?n:null},d)}}catch(e){throw ex.capture(e),e}},e})({}).entry();self.kakaoPixel=e.module}}catch(e){}}();